<template>
  <div class="search-item" :class="{ show: visible }">
    <div class="search-name">
      <div class="name">{{ info[0] }}</div>
      <div class="address">{{ info[1] }}</div>
      <div class="go-phone">
        <i class="iconfont icon-phone"></i>
        <span>去手机查看详情</span>
      </div>
    </div>
    <div class="gaode-phone">
      <div class="left">
        <div class="one">高德地图手机版</div>
        <div class="two">高德地图 哪儿都熟</div>
        <div class="three">去官网下载</div>
      </div>
      <div class="right">
        <img src="/img/二维码.png" />
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps({
  visible: {
    type: Boolean,
    default: false
  },
  info: {
    type: Array,
    default: () => []
  }
})
</script>

<style lang="scss" scoped>
.search-item {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  background: #fff;
  position: absolute;
  top: 55px;
  left: 10px;
  padding: 20px;
  height: 0px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
  &.show {
    opacity: 1;
    height: 220px;
    pointer-events: auto;
  }
  .search-name {
    color: #666;
    font-size: 14px;
    .address {
      font-size: 13px;
      color: #999;
      margin: 5px 0;
    }
    .go-phone {
      color: rgb(26, 134, 2455);
      font-size: 13px;
    }
  }
  .gaode-phone {
    display: flex;
    gap: 100px;
    justify-content: space-between;
    margin-top: 20px;
    .left {
      font-size: 12px;
      color: #666;
      .one {
        font-size: 16px;
        font-weight: 700;
        color: rgb(26, 134, 2455);
      }
      .three {
        text-align: center;
        line-height: 35px;
        color: #fff;
        width: 120px;
        height: 35px;
        background: rgb(26, 134, 2455);
        border-radius: 20px;
        margin-top: 10px;
      }
    }
    .right {
      img {
        width: 88px;
        height: 88px;
      }
    }
  }
}
</style>